#!/bin/sh
JAVA=/opt/soft/java/bin/java
EFIX=/opt/web/heatmap
cd $EFIX
CP=$EFIX
export LANG="en_US.UTF-8"
for i in $EFIX/lib/*.jar;do
        CP="$i:$CP"
done
var=`date +%Y%m%d`
if [ $# -eq 1 ]; then
    day="$1"
else
    day=`date +%Y%m%d --date '-1 day'`
fi
$JAVA -classpath $CP -Xms3g -Xmx3g com.bj58.heatmap.util.ChangeStyle $day 1>logs/changeStyleLog/stdout_$var.log 2>logs/changeStyleLog/stderr_$var.log &
wait
#/usr/bin/rsync  --daemon --config=/etc/rsyncd.conf
#/etc/init.d/xinetd restart     #查看各协议相关信息netstat -tulp
#service xinetd restart
rsync -aSvH --password-file=/etc/rsyncd.secrets /opt/web/bi.t.58.com/views/heatmap/ zhaoxiang@10.5.20.13::views 1>>logs/rsyncLog/stdout_$var.log 2>>logs/rsyncLog/stdout_$err.log
rsync -aSvH --password-file=/etc/rsyncd.secrets /opt/web/bi.t.58.com/resources/heatmap/ zhaoxiang@10.5.20.13::resources 1>>logs/rsyncLog/stdout_$var.log 2>>logs/rsyncLog/stdout_$err.log